3.54 \(\int \frac{(a+b \log (c x^n))^2}{x} \, dx\)

Optimal. Leaf size=22 \[ \frac{\left (a+b \log \left (c x^n\right )\right )^3}{3 b n} \]

[Out]

(a + b*Log[c*x^n])^3/(3*b*n)

________________________________________________________________________________________

Rubi [A]  time = 0.0239641, antiderivative size = 22, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 2, integrand size = 16, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.125, Rules used = {2302, 30} \[ \frac{\left (a+b \log \left (c x^n\right )\right )^3}{3 b n} \]

Antiderivative was successfully verified.

[In]

Int[(a + b*Log[c*x^n])^2/x,x]

[Out]

(a + b*Log[c*x^n])^3/(3*b*n)

Rule 2302

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)/(x_), x_Symbol] :> Dist[1/(b*n), Subst[Int[x^p, x], x, a + b*L
og[c*x^n]], x] /; FreeQ[{a, b, c, n, p}, x]

Rule 30

Int[(x_)^(m_.), x_Symbol] :> Simp[x^(m + 1)/(m + 1), x] /; FreeQ[m, x] && NeQ[m, -1]

Rubi steps

\begin{align*} \int \frac{\left (a+b \log \left (c x^n\right )\right )^2}{x} \, dx &=\frac{\operatorname{Subst}\left (\int x^2 \, dx,x,a+b \log \left (c x^n\right )\right )}{b n}\\ &=\frac{\left (a+b \log \left (c x^n\right )\right )^3}{3 b n}\\ \end{align*}

Mathematica [A]  time = 0.0030663, size = 22, normalized size = 1. \[ \frac{\left (a+b \log \left (c x^n\right )\right )^3}{3 b n} \]

Antiderivative was successfully verified.

[In]

Integrate[(a + b*Log[c*x^n])^2/x,x]

[Out]

(a + b*Log[c*x^n])^3/(3*b*n)

________________________________________________________________________________________

Maple [B]  time = 0.037, size = 56, normalized size = 2.6 \begin{align*}{\frac{{b}^{2} \left ( \ln \left ( c{x}^{n} \right ) \right ) ^{3}}{3\,n}}+{\frac{b \left ( \ln \left ( c{x}^{n} \right ) \right ) ^{2}a}{n}}+{\frac{\ln \left ( c{x}^{n} \right ){a}^{2}}{n}}+{\frac{{a}^{3}}{3\,bn}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+b*ln(c*x^n))^2/x,x)

[Out]

1/3*b^2/n*ln(c*x^n)^3+b/n*ln(c*x^n)^2*a+1/n*ln(c*x^n)*a^2+1/3/b/n*a^3

________________________________________________________________________________________

Maxima [A]  time = 1.18812, size = 27, normalized size = 1.23 \begin{align*} \frac{{\left (b \log \left (c x^{n}\right ) + a\right )}^{3}}{3 \, b n} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*x^n))^2/x,x, algorithm="maxima")

[Out]

1/3*(b*log(c*x^n) + a)^3/(b*n)

________________________________________________________________________________________

Fricas [B]  time = 0.837986, size = 136, normalized size = 6.18 \begin{align*} \frac{1}{3} \, b^{2} n^{2} \log \left (x\right )^{3} +{\left (b^{2} n \log \left (c\right ) + a b n\right )} \log \left (x\right )^{2} +{\left (b^{2} \log \left (c\right )^{2} + 2 \, a b \log \left (c\right ) + a^{2}\right )} \log \left (x\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*x^n))^2/x,x, algorithm="fricas")

[Out]

1/3*b^2*n^2*log(x)^3 + (b^2*n*log(c) + a*b*n)*log(x)^2 + (b^2*log(c)^2 + 2*a*b*log(c) + a^2)*log(x)

________________________________________________________________________________________

Sympy [A]  time = 22.3419, size = 60, normalized size = 2.73 \begin{align*} \begin{cases} \frac{a^{2} \log{\left (c x^{n} \right )} + a b \log{\left (c x^{n} \right )}^{2} + \frac{b^{2} \log{\left (c x^{n} \right )}^{3}}{3}}{n} & \text{for}\: n \neq 0 \\\left (a^{2} + 2 a b \log{\left (c \right )} + b^{2} \log{\left (c \right )}^{2}\right ) \log{\left (x \right )} & \text{otherwise} \end{cases} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*ln(c*x**n))**2/x,x)

[Out]

Piecewise(((a**2*log(c*x**n) + a*b*log(c*x**n)**2 + b**2*log(c*x**n)**3/3)/n, Ne(n, 0)), ((a**2 + 2*a*b*log(c)
 + b**2*log(c)**2)*log(x), True))

________________________________________________________________________________________

Giac [B]  time = 1.24202, size = 76, normalized size = 3.45 \begin{align*} \frac{1}{3} \, b^{2} n^{2} \log \left (x\right )^{3} + b^{2} n \log \left (c\right ) \log \left (x\right )^{2} + b^{2} \log \left (c\right )^{2} \log \left (x\right ) + a b n \log \left (x\right )^{2} + 2 \, a b \log \left (c\right ) \log \left (x\right ) + a^{2} \log \left (x\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*x^n))^2/x,x, algorithm="giac")

[Out]

1/3*b^2*n^2*log(x)^3 + b^2*n*log(c)*log(x)^2 + b^2*log(c)^2*log(x) + a*b*n*log(x)^2 + 2*a*b*log(c)*log(x) + a^
2*log(x)